/**
 * main主体
 * @author kangjx
 * @date 2022-10-10
 */
// 引入vue技术
import {Component, createApp} from 'vue'
// 引入app.vue页面
import App from './App.vue'
// 导入自定义路由
import router from './router/index'
// 引入;inia
import {createPinia} from "pinia"
// 引入antd-design-vue
import Antd from 'ant-design-vue'
// 引入antd样式
import 'ant-design-vue/dist/antd.css'
import * as antIcons from '@ant-design/icons-vue'
/**
 * 创建pinia实例
 */
const pinia = createPinia()

/**
 * createApp(App) : 创建app实例
 * .use(router) 挂载自定义路由
 * .use(pinia) 挂载pinia
 */
const app = createApp(App)
            .use(router)
            .use(Antd)
            .use(pinia);


// 全局注册图标
const icons: Component = antIcons;
for (const i in icons) {
    app.component(i, icons[i]);
}

/**
 * .mount('#app') 实例存放页面处
 * .use(Antd) 挂载antd
 */
app.mount('#app')
